/*
 * $Id: TcpAddress.cc,v 1.3 2005-07-23 09:22:42 bacon Exp $
 */

#include <xpp/net/TcpAddress.h>
#include <xpp/net/Socket.h>

namespace xpp
{
	namespace net
	{

		TcpAddress::TcpAddress (): InetAddress (V0, Socket::STREAM)
		{
		}

		TcpAddress::TcpAddress (int family): InetAddress (family, Socket::STREAM)
		{
		}

		TcpAddress::TcpAddress (const InetAddress& adr): InetAddress (adr)
		{
			address_type = Socket::STREAM;
		}

		TcpAddress::TcpAddress (
			const struct sockaddr_in& adr): InetAddress (adr)
		{
			address_type = Socket::STREAM;
		}

		TcpAddress::TcpAddress (
			const struct sockaddr_in6& adr): InetAddress (adr)
		{
			address_type = Socket::STREAM;
		}

		TcpAddress& TcpAddress::operator= (const InetAddress& adr)
		{
			InetAddress::operator= (adr);
			address_type = Socket::STREAM;
			return *this;
		}

		TcpAddress& TcpAddress::operator= (
			const struct sockaddr_storage& adr)
		{
			InetAddress::operator= (adr);
			address_type = Socket::STREAM;
			return *this;
		}

		TcpAddress& TcpAddress::operator= (
			const struct sockaddr_in& adr)
		{
			InetAddress::operator= (adr);
			address_type = Socket::STREAM;
			return *this;
		}

		TcpAddress& TcpAddress::operator= (
			const struct sockaddr_in6& adr)
		{
			InetAddress::operator= (adr);
			address_type = Socket::STREAM;
			return *this;
		}

	}
}
